package sigletondemo;

public class School {
    public static void main(String[] args) {
        Principal principal1 = Principal.getPrincipal();
        principal1.announcement("今天放假！");

        Principal principal2 = Principal.getPrincipal();
        principal2.approveDocument("食堂饭菜每次都得夹肉!");


        // 检查是否是同一个校长实例
        System.out.println("上述两个是同一位校长吗？ " + (principal1 == principal2));

    }
}
